module.exports = (db) => {
    const { INTEGER, STRING, CHAR, BIGINT, BOOLEAN, TEXT } = require('sequelize').Sequelize
    const Replie = db.define('replie', {
        id: {
            type: INTEGER.UNSIGNED,
            primaryKey: true,
            allowNull: false,
            autoIncrement: true,
            unique: true,
            comment: '',
        },
        origin_id: {
            type: STRING(100),
            allowNull: false,
            comment: '源回复ID',
        },
        article_id: {
            type: INTEGER(11),
            allowNull: false,
            comment: '回复所属文章ID',
        },
        user_id: {
            type: INTEGER(11),
            allowNull: false,
            comment: '回复人ID',
        },
        content: {
            type: TEXT('long'),
            allowNull: false,
            comment: '回复内容',
        },
        created_at: {
            type: BIGINT,
            allowNull: false,
            comment: '回复时间',
        },
    }, {
        timestamps: false,
    });
    return Replie;
}